<%@page import="java.nio.channels.SeekableByteChannel"%>
<%@page import="cn.sendto.model.ResidentInfoModel"%>
<%@page import="cn.sendto.model.UserInfoModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" errorPage="err.jsp"%>
	<jsp:include page="lock.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页</title>
</head>
<body>
	<%
		/* Cookie[] cks = request.getCookies();
		if (cks != null) {
			for (int i = 0; i < cks.length; i++) {
				if(cks[i].getName().equals("username")){
					out.print("欢迎您，"+cks[i].getValue());
				}
			}
		} */
		if (session.getAttribute("loginUser") != null) {
			UserInfoModel uim = (UserInfoModel) session.getAttribute("loginUser");
				out.print("欢迎您，" + uim.getName());
		}else{
			ResidentInfoModel rim = (ResidentInfoModel)session.getAttribute("loginResident");
			out.print("欢迎您，" + rim.getName());
		}
	%>
	,登陆成功！
</body>
</html>